<?php

namespace App\Models\Headquarters;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Material extends Model
{
    use HasFactory;
    public $timestamps = FALSE;
    protected $table = 'T_BD_Material';
    protected $fillable = ['FID', 'FName_L2', 'FNumber', 'FBaseUnit', 'FCreateTime', 'FMaterialGroupID', 'FModel', 'FStatus', 'FLastUpdateTime'];

    public function __construct(array $attributes = [])
    {
        parent::__construct($attributes);
    }

    public function findRowById($Id){
        return self::whereRaw('FID COLLATE Latin1_General_BIN = ?', [$Id])->first();
    }
}
